#include<stdio.h>
int main()
{
	int arr[4] = { 0 };
	int i = 0;
	for (i = 0; i < 4; i++)
	{
		scanf_s("%d", &arr[i]);
	}
	i = 0;
	while (i<4)
	{
		int j = 0;
		j=arr[3];
		arr[3] = arr[1];
		arr[1] = arr[0];
		arr[0] = arr[2];
		arr[2] = j;
		if ((arr[0] < arr[1]) && (arr[0] < arr[2]) && (arr[1] < arr[3]))
		{
			printf("Yes\n");
			break;
		}
		i++;
	}
	if (i == 4)
		printf("No\n");

	return 0;
}